﻿<!doctype html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>也许有用 技术论坛 - MAYBE IT WORKS</title>
<link th:href="@{/show/css/bootstrap.min.css}" type="text/css" rel="stylesheet">
<link th:href="@{/show/css/style.css}" type="text/css" rel="stylesheet">
<link type="text/css" th:href="@{/show/css/nprogress.css}" rel="stylesheet">
<!--[if lt IE 9]>
    <script src="js/html5shiv.min.js" type="text/javascript"></script>
    <script src="js/respond.min.js" type="text/javascript"></script>
    <script src="js/selectivizr-min.js" type="text/javascript"></script>
<![endif]-->
    <link rel="icon" th:href="@{/show/images/icon/favicon.ico}" type="image/x-icon"/>
    <link rel="bookmark" th:href="@{/show/images/icon/favicon.ico}" type="image/x-icon"/>
<!--
<link rel="apple-touch-icon-precomposed" th:href="@{/show/images/icon/icon.png}">
<link rel="shortcut icon" type="image/vnd.microsoft.icon" th:href="@{/show/images/icon/favicon.ico}">-->
<meta name="Keywords" content="" />
<meta name="description" content="" />
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}">
  <link rel="stylesheet" th:href="@{/show/css/imgSizeSmall.css}">
    <script th:src="@{/layui/layui.js}"></script>
<script type="text/javascript">
//判断浏览器是否支持HTML5
/*window.onload = function() {
	if (!window.applicationCache) {
<!-- 		window.location.href="ie.html"; -->
	}
}*/
</script>
</head>

<body>
<section class="container user-select">
  <header th:fragment="leftbar">
    <div class="hidden-xs header"><!--超小屏幕不显示-->
      <h1 class="logo"> <a th:href="@{/show/main}" title="异清轩技术博客 - POWERED BY WY ALL RIGHTS RESERVED"></a> </h1>
      <ul class="nav hidden-xs-nav">
        <!--<li class="active"><a th:href="@{/show/main}"><span class="glyphicon glyphicon-home"></span>网站首页</a></li>-->
        <li>
          <a th:if="${session.loginUser!=null}" th:href="@{/userCenter/show/}+${session.loginUser.getUserId}"><img class="contentDiv" th:src="@{/upload/userimg/}+${session.loginUser.getWallet().getAvatar()}"><font th:text="${session.loginUser.getUserAccount}+'的家'"></font></a>
          <a th:if="${session.loginUser==null}" th:href="@{/loginCenter/toLogin}"><span class="glyphicon glyphicon-user"></span>请登录</a>
        </li>
        <li><a th:href="@{/show/download}"><span class="glyphicon glyphicon-inbox"></span>资源中心</a></li>
        <li><a th:href="@{/show/toCalendar}"><span class="glyphicon glyphicon-calendar"></span>程序员老黄历</a></li>
        <li><a th:href="@{/show/utilList}"><span class="glyphicon glyphicon-briefcase"></span>小程序</a></li>
        <li><a th:href="@{/show/about}"><span class="glyphicon glyphicon-phone-alt"></span>关于我们</a></li>
      </ul>
    </div>
    <!--/超小屏幕不显示-->
    <div class="visible-xs header-xs"><!--超小屏幕可见-->
      <div class="navbar-header header-xs-logo">
        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#header-xs-menu" aria-expanded="false" aria-controls="navbar"><span class="glyphicon glyphicon-menu-hamburger"></span></button>
      </div>
      <div id="header-xs-menu" class="navbar-collapse collapse">
        <ul class="nav navbar-nav header-xs-nav">
          <li>
            <a th:if="${session.loginUser!=null}" th:href="@{/userCenter/show/}+${session.loginUser.getUserId}"><img class="contentDiv" th:src="@{/upload/userimg/}+${session.loginUser.getWallet().getAvatar()}"><font th:text="${session.loginUser.getUserAccount}+'的家'"></font></a>
            <a th:if="${session.loginUser==null}" th:href="@{/loginCenter/toLogin}"><span class="glyphicon glyphicon-user"></span>请登录</a>
          </li>
          <li><a th:href="@{/show/download}"><span class="glyphicon glyphicon-inbox"></span>资源中心</a></li>
          <li><a th:href="@{/show/about}"><span class="glyphicon glyphicon-phone-alt"></span>关于我们</a></li>
        </ul>
        <form class="navbar-form" action="search.php" method="post" style="padding:0 25px;">
          <div class="input-group">
            <input type="text" class="form-control" placeholder="请输入关键字">
            <span class="input-group-btn">
            <button class="btn btn-default btn-search" type="submit">搜索</button>
            </span> </div>
        </form>
      </div>
    </div>
  </header>
  <!--/超小屏幕可见-->
  <div class="content-wrap"><!--内容-->
    <div class="content">
      <div id="carousel-example-generic" class="carousel slide" data-ride="carousel"> <!--banner-->
        <ol class="carousel-indicators">
          <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
          <li data-target="#carousel-example-generic" data-slide-to="1"></li>
          <li data-target="#carousel-example-generic" data-slide-to="2"></li>
        </ol>
        <div class="carousel-inner" role="listbox">
          <div class="item active"> <a href="content.html" target="_blank"><img src="images/img1.jpg" alt="" /></a>
            <div class="carousel-caption"> 欢迎来到也许有用技术论坛，在这里你可以查找你需要技术文章和资源等 </div>
            <span class="carousel-bg"></span> </div>
          <div class="item"> <a href="content.html" target="_blank"><img src="images/img2.jpg" alt="" /></a>
            <div class="carousel-caption"> 欢迎来到也许有用技术论坛，在这里你可以查找你需要技术文章和资源等 </div>
            <span class="carousel-bg"></span> </div>
          <div class="item"> <a href="content.html" target="_blank"><img src="images/img3.jpg" alt="" /></a>
            <div class="carousel-caption"> 欢迎来到也许有用技术论坛，在这里你可以查找你需要技术文章和资源等 </div>
            <span class="carousel-bg"></span> </div>
        </div>
        <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev"> <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> <span class="sr-only">Previous</span> </a> <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next"> <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> <span class="sr-only">Next</span> </a> </div>
      <!--/banner-->
      <div class="content-block hot-content hidden-xs">
        <h2 class="title"><strong>本周热门排行</strong></h2>
        <ul>
          <li class="large"><a href="content.html" target="_blank"><img src="images/img3.jpg" alt="">
            <h3> 欢迎来到也许有用技术论坛 </h3>
            </a></li>
          <li><a href="content.html" target="_blank"><img src="images/logo.jpg" alt="">
            <h3> 欢迎来到也许有用技术论坛，在这里你可以查找你需要技术文章和资源等 </h3>
            </a></li>
          <li><a href="content.html" target="_blank"><img src="images/img2.jpg" alt="">
            <h3> 欢迎来到也许有用技术论坛，在这里你可以查找你需要技术文章和资源等 </h3>
            </a></li>
          <li><a href="content.html" target="_blank"><img src="images/img1.jpg" alt="">
            <h3> 欢迎来到也许有用技术论坛，在这里你可以查找你需要技术文章和资源等 </h3>
            </a></li>
          <li><a href="content.html" target="_blank"><img src="images/logo.jpg" alt="">
            <h3> 欢迎来到也许有用技术论坛，在这里你可以查找你需要技术文章和资源等 </h3>
            </a></li>
        </ul>
      </div>
      <div class="content-block new-content">
        <h2 class="title"><strong>最新文章</strong></h2>
        <div class="row" >
          <div class="news-list" th:each="page:${pages.getRecords()}">
            <div class="news-img col-xs-5 col-sm-5 col-md-4"> <a target="_blank" th:href="@{/show/content/}+${page.getArticleId()}" ><img th:src="@{/show/images/logo.jpg}" alt=""> </a> </div>
            <div class="news-info col-xs-7 col-sm-7 col-md-8">
              <dl >
                <dt> <a th:href="@{/show/content/}+${page.getArticleId()}" target="_blank" th:text="${page.getTitle()}"> 异清轩技术博客正式上线！ </a> </dt>
                <dd><span class="name"><a th:href="@{/userCenter/show/}+${page.getAuthor()}" th:text="${page.getAuthor()}" th:title="'由'+${page.getAuthor()}+'发布'" title="由 异清轩 发布" rel="author">异清轩</a></span> <span class="identity"></span> <span class="time" th:text="${#dates.format(page.getCreateTime(),'yyyy-MM-dd HH:mm:ss')}"> 2015-10-19 </span><!--&nbsp;&nbsp;&nbsp;<span th:if="${page.getTop =='1'}" class="glyphicon glyphicon-plane" style="color: #3399CC"></span>--></dd>
                <dd class="text" th:text="${page.getDescription()}">欢迎来到异清轩技术博客，在这里可以看到网站前端和后端的技术，还有CMS内容管理系统，包括但不限于这些还有CMS内容管理系统，包括但不限于这些。</dd>
              </dl>
              <div class="news_bot col-sm-7 col-md-8"> <span class="tags visible-lg visible-md" > <a href="" th:each="tag:${#strings.arraySplit(page.getTags(),';')}" th:text="${tag}">本站</a> </span> <span class="look"> 共 <strong th:text="${page.getHits()}">2126</strong> 人围观，发现 <strong th:text="${page.getHits()-page.getZan()}"> 12 </strong> 个不明物体 </span> </div>
            </div>
          </div>
        </div>
        <div class="quotes" style="margin-top:15px">
            <span class="disabled" th:if="${pages.getCurrent()==1}">首页</span>
            <a th:onclick="page(0)"  th:if="${pages.getCurrent()!=1}">首页</a>
            <span class="disabled" th:if="${pages.getCurrent()==1}">上一页</span>
            <a th:onclick="page(1)" th:if="${pages.getCurrent()!=1}">上一页</a>
            <font th:each="index : ${#numbers.sequence(1, pages.getPages())}">
                <a th:href="@{/show/main}+'?pageNum='+${index}" th:if="${index!=pages.getCurrent()}" th:text="${index}">2</a>
                <span class="current" th:if="${index==pages.getCurrent()}" th:text="${pages.getCurrent()}">1</span>
            </font>
            <span class="disabled" th:if="${pages.getCurrent()==pages.getPages()}">下一页</span>
            <a th:onclick="page(2)" th:if="${pages.getCurrent()!=pages.getPages()}">下一页</a>
            <span class="disabled" th:if="${pages.getCurrent()==pages.getPages()}">尾页</span>
            <a th:onclick="page(3)" th:if="${pages.getCurrent()!=pages.getPages()}">尾页</a>
        </div>
      </div>
    </div>
  </div>
  <!--/内容-->
  <aside class="sidebar visible-lg" th:fragment="rightbar"><!--右侧>992px显示-->
    <div class="sentence"> <strong>每日一句</strong>
      <h2 id="date">2015年11月1日 星期日</h2>
      <p id="selfwords">你是我人生中唯一的主角，我却只能是你故事中的一晃而过得路人甲。</p>
    </div>
    <div id="search" class="sidebar-block search" role="search">
      <h2 class="title"><strong>搜索</strong></h2>
      <form class="navbar-form">
        <div class="input-group">
          <input id="words" name="words" th:value="${words}" type="text" class="form-control" size="35" placeholder="请输入关键字">
          <span class="input-group-btn">
          <button id="btn_words" class="btn btn-default btn-search" type="button">搜索</button>
          </span> </div>
      </form>
    </div>
    <div class="sidebar-block recommend">
      <h2 class="title"><strong>热门推荐</strong></h2>
      <ul th:each="article:${articles}">
        <li><a target="_blank" th:href="@{/show/content/}+${article.getArticleId()}"> <span class="thumb"><img th:src="@{/show/images/icon/icon.png}" alt=""></span> <span class="text" th:text="${article.getTitle()}">异清轩技术博客的SHORTCUT和ICON图标 ...</span> <span class="text-muted">阅读(<font th:text="${article.getHits()}"></font>)</span></a></li>
        <!--<li><a target="_blank" href=""> <span class="thumb"><img src="images/icon/icon.png" alt=""></span> <span class="text">异清轩技术博客的SHORTCUT和ICON图标 ...</span> <span class="text-muted">阅读(2165)</span></a></li>
        <li><a target="_blank" href=""> <span class="thumb"><img src="images/icon/icon.png" alt=""></span> <span class="text">异清轩技术博客的SHORTCUT和ICON图标 ...</span> <span class="text-muted">阅读(2165)</span></a></li>
        <li><a target="_blank" href=""> <span class="thumb"><img src="images/icon/icon.png" alt=""></span> <span class="text">异清轩技术博客的SHORTCUT和ICON图标 ...</span> <span class="text-muted">阅读(2165)</span></a></li>
        <li><a target="_blank" href=""> <span class="thumb"><img src="images/icon/icon.png" alt=""></span> <span class="text">异清轩技术博客的SHORTCUT和ICON图标 ...</span> <span class="text-muted">阅读(2165)</span></a></li>-->
      </ul>
    </div>
   <!-- <div class="sidebar-block comment">
      <h2 class="title"><strong>最新评论</strong></h2>
      <ul>
        <li th:each="comment:${comments}" data-toggle="tooltip" data-placement="top" th:title="${comment.getAuthor()}+'的评论'">
          <a target="_blank" th:href="@{/show/content/}+${comment.getArticleId()}">
            <span class="face">
              <img th:src="@{/show/images/headicon/}+${comment.getIcon()}+'.png'" alt="">
            </span>
            <span class="text">
              <strong th:text="${comment.getAuthor()}">异清轩站长</strong> (<font th:text="${#dates.format(comment.getCreateTime(),'yyyy-MM-dd HH:mm:ss')}">2015-10-18</font>) 说：<br />
              <p style="width:200px; white-space: nowrap; overflow: hidden;text-overflow: ellipsis;" th:text="${comment.getContent()}">欢迎来到异清轩技术博客，在这里可以看到网站前端和后端的技术等 ...</p>
            </span>
          </a>
        </li>
      </ul>
    </div>-->
  </aside>
  <!--/右侧>992px显示-->
  <footer class="footer" th:fragment="bottombar">POWERED BY &copy;<a href="http://39.107.119.38:8886/view/index">赵家宝 MyBlog.com</a> ALL RIGHTS RESERVED &nbsp;&nbsp;&nbsp;<span><a href="http://www.miitbeian.gov.cn/" target="_blank">豫ICP备15026801号-1</a></span> <span style="display:none"><a href="">网站统计</a></span> </footer>
</section>
<div><a href="javascript:;" class="gotop" style="display:none;"></a></div>
<!--/返回顶部--> 
<script th:src="@{/show/js/jquery-2.1.4.min.js}" type="text/javascript"></script>
<script th:src="@{/show/js/nprogress.js}" type="text/javascript" ></script>
<script th:src="@{/show/js/bootstrap.min.js}" type="text/javascript"></script>
<script th:src="@{/show/js/comm/right.js}" type="text/javascript"></script>
<script type="text/javascript" th:inline="javascript">
//页面加载
$('body').show();
$('.version').text(NProgress.version);
NProgress.start();
setTimeout(function() { NProgress.done(); $('.fade').removeClass('out'); }, 1000);
//返回顶部按钮
$(function(){
	$(window).scroll(function(){
		if($(window).scrollTop()>100){
			$(".gotop").fadeIn();	
		}
		else{
			$(".gotop").hide();
		}
	});
	$(".gotop").click(function(){
		$('html,body').animate({'scrollTop':0},500);
	});
});
//提示插件启用
$(function () {
  $('[data-toggle="popover"]').popover();
});
$(function () {
	$('[data-toggle="tooltip"]').tooltip();
});
//鼠标滑过显示 滑离隐藏
$(function(){
	$(".carousel").hover(function(){
		$(this).find(".carousel-control").show();
	},function(){
		$(this).find(".carousel-control").hide();
	});
});
$(function(){
	$(".hot-content ul li").hover(function(){
		$(this).find("h3").show();
	},function(){
		$(this).find("h3").hide();
	});
});
//页面元素智能定位
$.fn.smartFloat = function() { 
	var position = function(element) { 
		var top = element.position().top; //当前元素对象element距离浏览器上边缘的距离 
		var pos = element.css("position"); //当前元素距离页面document顶部的距离
		$(window).scroll(function() { //侦听滚动时 
			var scrolls = $(this).scrollTop(); 
			if (scrolls > top) { //如果滚动到页面超出了当前元素element的相对页面顶部的高度 
				if (window.XMLHttpRequest) { //如果不是ie6 
					element.css({ //设置css 
						position: "fixed", //固定定位,即不再跟随滚动 
						top: 0 //距离页面顶部为0 
					}).addClass("shadow"); //加上阴影样式.shadow 
				} else { //如果是ie6 
					element.css({ 
						top: scrolls  //与页面顶部距离 
					});     
				} 
			}else { 
				element.css({ //如果当前元素element未滚动到浏览器上边缘，则使用默认样式 
					position: pos, 
					top: top 
				}).removeClass("shadow");//移除阴影样式.shadow 
			} 
		}); 
	}; 
	return $(this).each(function() { 
		position($(this));                          
	}); 
}; 
//启用页面元素智能定位
$(function(){
	$("#search").smartFloat();
});
//异步加载更多内容
jQuery("#pagination a").on("click", function ()
{
    var _url = jQuery(this).attr("href");
    var _text = jQuery(this).text();
    jQuery(this).attr("href", "javascript:viod(0);");
    jQuery.ajax(
    {
        type : "POST",
        url : _url,
        success : function (data)
        {
            //将返回的数据进行处理，挑选出class是news-list的内容块
            result = jQuery(data).find(".row .news-list");
            //newHref获取返回的内容中的下一页的链接地址
            nextHref = jQuery(data).find("#pagination a").attr("href");
            jQuery(this).attr("href", _url);
            if (nextHref != undefined)
            {
                jQuery("#pagination a").attr("href", nextHref);
            }
			else
            {
                jQuery("#pagination a").html("下一页没有了").removeAttr("href")
            }
            // 渐显新内容
            jQuery(function ()
            {
                jQuery(".row").append(result.fadeIn(300));
                jQuery("img").lazyload(
                {
                    effect : "fadeIn"
                });
            });
        }
    });
    return false;
});

function page(x) {
    var words=$("#words").val();
    var  page=[[${pages.getCurrent()}]];
    var end_page=[[${pages.getPages()}]];
    var downPage = page+1;
    var topPage = page-1;
    //首页
    if (x==0){
        window.location.href="/show/main?pageNum="+1+"&words="+words;
    }
    if (x==1){
        window.location.href="/show/main?pageNum="+topPage+"&words="+words;
    }
    if (x==2){
        window.location.href="/show/main?pageNum="+downPage+"&words="+words;
    }
    if (x==3){
        window.location.href="/show/main?pageNum="+end_page+"&words="+words;
    }
}
$(function () {
    var announcement = [[${announcement}]];
    console.log(announcement)
    if (announcement == null){
        return
    }
    var content = announcement.content;
    var title = announcement.title;
    if (title == "" || title == null){
        title= false
    }
  content=content.replaceAll('\n','<br/>');
  if(!window.name){
        window.name = 'first';
        layui.use('layer', function(){
            var layer = layui.layer;
                layer.open({
                    type: 1
                    ,title: title //不显示标题栏false
                    ,closeBtn: false
                    ,area: '300px;'
                    ,shade: 0.8
                    ,id: 'LAY_layuipro' //设定一个id，防止重复弹出
                    ,btn: '欢迎使用'
                    ,btnAlign: 'c'
                    ,moveType: 1 //拖拽模式，0或者1
/*                    ,content: '<div style="padding: 50px; line-height: 22px; background-color: #393D49; color: #fff; font-weight: 300;">亲,你好！<br>也许有用 技术论坛 <br>仍在开发中！ <br><br> 也许有用 技术论坛 - MAYBE IT WORKS，在这里你可以查找你需要技术文章和资源等  <br><br>您对，我们什么建议或者想法欢迎发送到下方邮箱,我们会思考采纳您的建议<br>1433304356@qq.com <br>我们也会 全力开发、维护、升级 ^_^</div>'*/
                    ,content: '<div style="padding: 50px; line-height: 22px; background-color: #393D49; color: #fff; font-weight: 300;">'+content+'</div>'

                });
            })
    }
})
</script>
</body>
</html>
